Repository navigation
Show how long ago each download permission was first granted - #54
Merged
Merged
Conversation
The datatable's permissions page gets a "First granted" column ("3 months
ago", with the date on hover), from permissions.created_at. Extending a
permission keeps the same row, so this is when access was first given;
older rows without a creation date show nothing.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_016AR3uoZS1uCC8hXmojk3K7
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
The per-datatable permissions page (
/permissions/:id, "People with access") gets a First granted column, between "Granted by" and "Access until", reading for example "3 months ago". The exact date shows on hover (and is in a<time datetime>attribute).permissions.created_at. Extending a permission updates the same row, so this stays the date access was first given, while "Granted by" shows whoever granted or extended it most recently.Testing
spec/requests/permissions_spec.rb: the datatable page shows "3 months ago" for a permission created three months ago.schema.rbbefore 7f502da, since master's current schema can't be loaded into a fresh database (see the structure.sql PR Dump the database schema as db/structure.sql #53).Generated by Claude Code